package com.sgcc.sx.pmos.e_sx_home.activity;//package com.sgcc.sx.pmos.e_sx_home.activity;
//
//import android.view.View;
//
//import com.alibaba.android.arouter.facade.annotation.Route;
//import com.alibaba.android.arouter.launcher.ARouter;
//import com.blankj.utilcode.util.SPUtils;
//import com.chad.library.adapter.base.BaseQuickAdapter;
//import com.sgcc.sx.pmos.arouter.home.HomeArouterPath;
//import com.sgcc.sx.pmos.common.base.MvpBaseRecycleActivity;
//import com.sgcc.sx.pmos.e_sx_home.R;
//import com.sgcc.sx.pmos.e_sx_home.adapter.PoliciesRegulationsAdapter;
//import com.sgcc.sx.pmos.e_sx_home.bean.DynamicBean;
//import com.sgcc.sx.pmos.e_sx_home.contract.PoliciesRegulationsContract;
//import com.sgcc.sx.pmos.e_sx_home.presenter.PoliciesRegulationsPresenter;
//
//import java.util.List;
//
///**
// * 政策法规
// */
//@Route(path = HomeArouterPath.HOME_POLICIESREGULATIONS)
//public class PoliciesRegulationsActivity extends MvpBaseRecycleActivity<DynamicBean, PoliciesRegulationsPresenter> implements PoliciesRegulationsContract.View {
//
//    private PoliciesRegulationsAdapter mPoliciesRegulationsAdapter;
//
//    @Override
//    public void querySuccess(List<DynamicBean> list) {
//        loadSuccess(false, list);
//    }
//
//    @Override
//    protected PoliciesRegulationsPresenter createPresenter() {
//        return new PoliciesRegulationsPresenter();
//    }
//
//    @Override
//    public BaseQuickAdapter getAdapter() {
//        mPoliciesRegulationsAdapter = new PoliciesRegulationsAdapter(mContext);
//        mPoliciesRegulationsAdapter.setOnItemClickListener(new PoliciesRegulationsAdapter.OnItemClickListener() {
//            @Override
//            public void itemClickListener(int position, DynamicBean bean) {
//                int number = SPUtils.getInstance(bean.getTitle_Id()).getInt("number");
//                number = number == -1 ? 0 : number;
//                number += 1;
//                SPUtils.getInstance(bean.getTitle_Id()).put("number", number);
//                ARouter.getInstance()
//                        .build(HomeArouterPath.HOME_PUBLICLAWSDYNAMICINFO)
//                        .withSerializable("mDynamicBean", bean)
//                        .withString("from", "1")
//                        .navigation();
//            }
//        });
//        return mPoliciesRegulationsAdapter;
//    }
//
//    @Override
//    public void getDataRequest(int listSize, boolean isloading) {
//        super.getDataRequest(listSize, isloading);
//        mPresenter.getPoliciesRegulationsListData();
//    }
//
//    @Override
//    public String getTitleText() {
//        return "政策法规";
//    }
//
//    @Override
//    protected void initViews() {
//        super.initViews();
//        title_bar.setRightIcon(R.mipmap.go_main, new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                goMainActivity();
//            }
//        });
//    }
//
//    @Override
//    protected void onResume() {
//        super.onResume();
//        refresh(false);
//    }
//}
